package mensch;

public class Pawn {
	
	private Player player;
	private Field field = null;
	private int fieldCounter = 0;
	
	public Pawn(Player player) {
		this.player = player;
	}
	
	public Player getPlayer() {
		return player;
	}
	
	public Field getField() {
		return field;
	}
	
	public void setField(Field field) {
		this.field = field;
	}
	
	public int getFieldCounter() {
		return fieldCounter;
	}
	
	public void incrementFieldCounter(int value) {
		fieldCounter += value;
		player.setProgress(fieldCounter);
	}
	
	public void resetCounter() {
		fieldCounter = 0;
		player.setProgress(0);
	}
	
	public void moveTo(Field newField) {
		field.setPawnOnField(null);
		newField.setPawnOnField(this);
		field = newField;
	}
}
